<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateCategoryTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('category', function (Blueprint $table) {
            $table->increments('id')->comment('自增ID');
            $table->string('name',50)->comment('分类名称');
            $table->string('describe',255)->comment('分类描述');
            $table->integer('visitor')->default(0)->comment('访问量');
            $table->tinyInteger('recommend')->default(2)->comment('推荐状态1：推荐2：非推荐');
            $table->tinyInteger('disstatus')->default(1)->comment('显示状态1：显示2：隐藏');
            $table->tinyInteger('constatus')->default(1)->comment('投稿权限1：允许投稿2：禁止投稿');
            $table->integer('time')->comment('创建时间');
            $table->integer('pid')->default(0)->comment('子分类ID');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
    }
}
